# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-photos
pkgver=40.0+14+g884b1fd1
pkgrel=1
pkgdesc="Access, organize, and share your photos on GNOME"
arch=(x86_64)
url="https://wiki.gnome.org/Apps/Photos"
license=(GPL)
depends=(exempi gtk3 libexif librsvg babl gegl gsettings-desktop-schemas
         grilo-plugins lcms2 tracker3-miners geocode-glib grilo gfbgraph libgdata
         libgexiv2 libraw gnome-online-accounts dleyna-server dleyna-renderer
         libdazzle libhandy)
makedepends=(python yelp-tools git meson docbook-xsl)
groups=(gnome)
_commit=884b1fd16e6ee505e216f38566c777131321a7ed  # gnome-40
source=("git+https://gitlab.gnome.org/GNOME/gnome-photos.git#commit=$_commit"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git submodule set-url subprojects/libgd "$srcdir/libgd"
  git submodule update
}

build() {
  arch-meson $pkgname build -D manuals=true
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}
